<?php
namespace app\admin\model;
use think\Model as UserModel;
use traits\model\SoftDelete;
class order extends UserModel
{
	
	//查询管理员身份
	public function orders()
	{
		//return   $this->where("aid=$id")->select();
		//获取权限信息
		
		return  $this->where('status','<=', 8)->order('create_time')->whereTime('create_time', 'today')->limit(5)->select();
		//$this->table('mall_mall_adm_lden admlden, mall_lden lden')->where("admlden.lid = lden.lid = $id")->select();

	}
	public function zixun()
	{

		return $this->table('mall_news')->order('create_time')->whereTime('create_time', 'today')->limit(5)->select();
	}
	// public function dayorder()
	// {
	// 	$yester = $this->where('status','<', 8)->whereTime('create_time', 'week')->select();//昨天的订单
	// 	var_dump($yester);
	// 	$today = $this->where('status','>=', 2)->whereTime('create_time', 'yesterday')->select();//今天的订单
	// 	return [$yester,$today];
	// }

}


